package com.yh.autobio.gddb.gdbean;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.ToOne;
import org.greenrobot.greendao.DaoException;
import org.greenrobot.greendao.annotation.NotNull;

/**
 * =========================
 * 版权所有，违法必究
 * 作者：john
 * <p>
 * 工程：FoodBarcode
 * <p>
 * 文件名：BackMatBean
 * <p>
 * 创建时间：2017.05.27.14:42
 * *****************************
 */
@Entity
public class BackMatBean {


    /**
     * id : 6146
     * model :
     * name : 奖品电水壶
     * number : 37.001
     * unit_name : 个
     * unit_id : 6221
     * unitgroup_name : 数量组
     * unitgroup_id : 6220
     * saleprice : 0
     * barcode : 5764
     * ftype : 1
     * defunitId : 6221
     * credit : 60
     */

    @Id(autoincrement = true)
    private Long ids;

    private String id;
    private String model;
    private String name;
    private String number;
    private String unit_name;
    private String unit_id;
    private String unitgroup_name;
    private String unitgroup_id;
    private double saleprice;
    private String barcode;
    private String ftype;
    private String defunitId;
    private String credit;
    private String FNote;

    private String baseunit;//
    private String baseName;//退货基本计量单位
    private double reprice;
    private String unitType;//判断退货单位类型  0代表baseName 1代表unit_name

    private String count;
    private String FDCStockName;
    private String FDCStockID;

    private String TDCStockName;
    private String TDCStockID;
    public String userName ;//用户名称
    public double allMoney ;//用户名称

    public long headId;
    @ToOne(joinProperty = "headId")
    private MatHead head;

    /** Used to resolve relations */
    @Generated(hash = 2040040024)
    private transient DaoSession daoSession;

    /** Used for active entity operations. */
    @Generated(hash = 179076691)
    private transient BackMatBeanDao myDao;

    @Generated(hash = 80859862)
    private transient Long head__resolvedKey;

    @Generated(hash = 421178721)
    public BackMatBean(Long ids, String id, String model, String name, String number, String unit_name,
            String unit_id, String unitgroup_name, String unitgroup_id, double saleprice,
            String barcode, String ftype, String defunitId, String credit, String FNote,
            String baseunit, String baseName, double reprice, String unitType, String count,
            String FDCStockName, String FDCStockID, String TDCStockName, String TDCStockID,
            String userName, double allMoney, long headId) {
        this.ids = ids;
        this.id = id;
        this.model = model;
        this.name = name;
        this.number = number;
        this.unit_name = unit_name;
        this.unit_id = unit_id;
        this.unitgroup_name = unitgroup_name;
        this.unitgroup_id = unitgroup_id;
        this.saleprice = saleprice;
        this.barcode = barcode;
        this.ftype = ftype;
        this.defunitId = defunitId;
        this.credit = credit;
        this.FNote = FNote;
        this.baseunit = baseunit;
        this.baseName = baseName;
        this.reprice = reprice;
        this.unitType = unitType;
        this.count = count;
        this.FDCStockName = FDCStockName;
        this.FDCStockID = FDCStockID;
        this.TDCStockName = TDCStockName;
        this.TDCStockID = TDCStockID;
        this.userName = userName;
        this.allMoney = allMoney;
        this.headId = headId;
    }

    @Generated(hash = 389049921)
    public BackMatBean() {
    }

    public String getId() {
        return this.id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getModel() {
        return this.model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNumber() {
        return this.number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public String getUnit_name() {
        return this.unit_name;
    }

    public void setUnit_name(String unit_name) {
        this.unit_name = unit_name;
    }

    public String getUnit_id() {
        return this.unit_id;
    }

    public void setUnit_id(String unit_id) {
        this.unit_id = unit_id;
    }

    public String getUnitgroup_name() {
        return this.unitgroup_name;
    }

    public void setUnitgroup_name(String unitgroup_name) {
        this.unitgroup_name = unitgroup_name;
    }

    public String getUnitgroup_id() {
        return this.unitgroup_id;
    }

    public void setUnitgroup_id(String unitgroup_id) {
        this.unitgroup_id = unitgroup_id;
    }

    public double getSaleprice() {
        return this.saleprice;
    }

    public void setSaleprice(double saleprice) {
        this.saleprice = saleprice;
    }

    public String getBarcode() {
        return this.barcode;
    }

    public void setBarcode(String barcode) {
        this.barcode = barcode;
    }

    public String getFtype() {
        return this.ftype;
    }

    public void setFtype(String ftype) {
        this.ftype = ftype;
    }

    public String getDefunitId() {
        return this.defunitId;
    }

    public void setDefunitId(String defunitId) {
        this.defunitId = defunitId;
    }

    public String getCredit() {
        return this.credit;
    }

    public void setCredit(String credit) {
        this.credit = credit;
    }

    public String getCount() {
        return this.count;
    }

    public void setCount(String count) {
        this.count = count;
    }

    public String getFDCStockName() {
        return this.FDCStockName;
    }

    public void setFDCStockName(String FDCStockName) {
        this.FDCStockName = FDCStockName;
    }

    public String getFDCStockID() {
        return this.FDCStockID;
    }

    public void setFDCStockID(String FDCStockID) {
        this.FDCStockID = FDCStockID;
    }

    public String getTDCStockName() {
        return this.TDCStockName;
    }

    public void setTDCStockName(String TDCStockName) {
        this.TDCStockName = TDCStockName;
    }

    public String getTDCStockID() {
        return this.TDCStockID;
    }

    public void setTDCStockID(String TDCStockID) {
        this.TDCStockID = TDCStockID;
    }

    public String getBaseunit() {
        return this.baseunit;
    }

    public void setBaseunit(String baseunit) {
        this.baseunit = baseunit;
    }


    public double getReprice() {
        return this.reprice;
    }

    public void setReprice(double reprice) {
        this.reprice = reprice;
    }

    public String getBaseName() {
        return this.baseName;
    }

    public void setBaseName(String baseName) {
        this.baseName = baseName;
    }

    public String getUnitType() {
        return this.unitType;
    }

    public void setUnitType(String unitType) {
        this.unitType = unitType;
    }

    public String getUserName() {
        return this.userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Long getIds() {
        return this.ids;
    }

    public void setIds(Long ids) {
        this.ids = ids;
    }

    public long getHeadId() {
        return this.headId;
    }

    public void setHeadId(long headId) {
        this.headId = headId;
    }

    /** To-one relationship, resolved on first access. */
    @Generated(hash = 353320111)
    public MatHead getHead() {
        long __key = this.headId;
        if (head__resolvedKey == null || !head__resolvedKey.equals(__key)) {
            final DaoSession daoSession = this.daoSession;
            if (daoSession == null) {
                throw new DaoException("Entity is detached from DAO context");
            }
            MatHeadDao targetDao = daoSession.getMatHeadDao();
            MatHead headNew = targetDao.load(__key);
            synchronized (this) {
                head = headNew;
                head__resolvedKey = __key;
            }
        }
        return head;
    }

    /** called by internal mechanisms, do not call yourself. */
    @Generated(hash = 906896995)
    public void setHead(@NotNull MatHead head) {
        if (head == null) {
            throw new DaoException(
                    "To-one property 'headId' has not-null constraint; cannot set to-one to null");
        }
        synchronized (this) {
            this.head = head;
            headId = head.getId();
            head__resolvedKey = headId;
        }
    }

    /**
     * Convenient call for {@link org.greenrobot.greendao.AbstractDao#delete(Object)}.
     * Entity must attached to an entity context.
     */
    @Generated(hash = 128553479)
    public void delete() {
        if (myDao == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        myDao.delete(this);
    }

    /**
     * Convenient call for {@link org.greenrobot.greendao.AbstractDao#refresh(Object)}.
     * Entity must attached to an entity context.
     */
    @Generated(hash = 1942392019)
    public void refresh() {
        if (myDao == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        myDao.refresh(this);
    }

    /**
     * Convenient call for {@link org.greenrobot.greendao.AbstractDao#update(Object)}.
     * Entity must attached to an entity context.
     */
    @Generated(hash = 713229351)
    public void update() {
        if (myDao == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        myDao.update(this);
    }

    public String getFNote() {
        return this.FNote;
    }

    public void setFNote(String FNote) {
        this.FNote = FNote;
    }

    public double getAllMoney() {
        return this.allMoney;
    }

    public void setAllMoney(double allMoney) {
        this.allMoney = allMoney;
    }

    /** called by internal mechanisms, do not call yourself. */
    @Generated(hash = 1260006736)
    public void __setDaoSession(DaoSession daoSession) {
        this.daoSession = daoSession;
        myDao = daoSession != null ? daoSession.getBackMatBeanDao() : null;
    }

    




}
